refactoring

refactored command_handler(), less chatty, exploded the repo