Cleaned up editing functions