added .level command (untested), cleaned up a bit the command handler