Cleaned up part of the code to update the editor frame.