Fixing config generation
Adding optional world arg and switch rather than if-chain
Doing some javadocs