Big refactor to prepare for Artemis 2.1.1 update

Fixes #34, fixes #35, fixes #36, fixes #37