more setting up game core...

made functions out of the boilerplate code