Changed close image
Refactored code
Updated picreel template
Updated api handlers