Many bug fixes

Lots of bug fixes and small revamp to tile data