Debugging MemoryError and cleanup

- better error handling in draw_tiles main loop
- clean up cache handling in Peekable