Added code to load images and draw grid units