Cleaned up the code, added formatting
refactored game