Removed unused imports
Fixed bug where committing an entity would not clear the fields_changed dict