change magic to simplify procedure: all pages are now padded to tile size and centered which resulted in some memory increase (up to tile boundry), but simplified code a lot.