enhanced metadata editor, cleaned up code, should be fully implemented and working