Refactor and DRY out registration
Refactor and DRY out registration

This makes it easier to extend registration without having to duplicate
all of the code again

recklessromeo/otm-core,maurizi/otm-core,RickMohr/otm-core,recklessromeo/otm-core,clever-crow-consulting/otm-core,maurizi/otm-core,recklessromeo/otm-core,RickMohr/otm-core,clever-crow-consulting/otm-core,recklessromeo/otm-core,clever-crow-consulting/otm-core,maurizi/otm-core,RickMohr/otm-core,RickMohr/otm-core,maurizi/otm-core,clever-crow-consulting/otm-core