more work on cleaning up tile.py