Image improvements. Needs some more testing.