Rejiggering commands. Moved main class to own file.