Started work on a singleplayer gamemode, and fixed some bugs