Refactor

Big refactor of my code, with the eventual aim of object-orientifying my
game