Christoph Gritschenberger:
	- move debug-code to own file
	- fix tiling bug introduced in 3.3.3
