Created separate class to manage images and other files via ajax