use @annotations to map commands to functions in main

Also update the override interface to use subcommands properly.