Took out printf.
Refactored to separate tile-engine-specific code.
Added two definitions.