update margins and remove old images