clean up and resizing on managepics