Moved the code to make it more pythonic, and added a basic bitmap
renderer.