Simplified main gui code
Simplified edit image
Fixed orientation bug