Fixed tile loading. Added random tile generation. Added a few wrapper functions.