Implement Entity and Level classes and minor tweaks to other stuff.