imagesloaded integration and code cleanup