Implement settings factory and refactor the registration

... to take advantage of the newly implemented structure.