Adding python script to mage pictures, update code to use object oriented design