Moved image processing code to folder