Refactor command line interface logic out of command line game