refactored and game fully functional

pls merge