Comments and more improvement.

more logic to not do extra processing. A lot more comments to explain whats happening.
having to re-extract the tile id seems messy - can we store it somewhere along with these requests?