Tried to move command handling init to main

It didn't work. Weird. Documented location of init in main.

Ready to be merged into master.