multiple refactorings; Using getData instead of getTile to retrieve image data