Added magnet module and migrated some methods to AddonUtils.