Addes saving to crop example and cleaned up some code