added some image processing stuff. Some memory management
sprint 3 end