Made buttons more generic and added basic (untested) game logic code