Split out everything into separate files.
Tried to contain logic and abstract tile sourece.