Move declaration map/MAGIC-on-CV interaction to its own function