MainActivity: refactor to bundle code editor fields and relation editor fields. simplifies the checks for whether there is an active code editor or relation editor