Added Mipmaps!

Now we use mipmaps on the textures! Also, changed that ugly non-legible
casts to a pretty function that explains what's happening.