Make the states a bit more explicit. Remove print statements.