fixed to work from blank config.xml
additional cleanup i think