Added saving of window geometry
Fixed jerky motions.