Glad its working, but for reference no changes to the retroarch.cfg are needed. It has a default setting to autoload the controller configs in /opt/retropie/configs/all/retroarch-joypads which is where ES should generate your clean controller file for you.
Here is a bit of info on how it works
RetroPie help guides --> https://goo.gl/Yfy8kj
Please read this before asking for help --> http://goo.gl/eLErnl