Port over some core gameplay files

A lot of this is untested, I haven't opened up the main loop yet