general tidy up, made subcommands case insensitive (unless I missed something)