Fixed a function error which was causing it not to run. Also moved config.xml and icon.png into 'www' folder as its a more natural place for them