I'm too sleepy and tired for a commit message.. just check the commit diff.. a lot of stuff, rendering entities and maps seperated onto their own functions which take their own arguments for texture-related data, so texture-packs will be easy to implement later.