Fixed tile offsets (and incidentally added a tone of debugging code)

Signed-off-by: Daniel Mansfield <daniel.mansfield99@gmail.com>