delete galleries, other fixes and cleanup