Finished refactoring tiles substystem. Sprites are a little broken now.