Further refactoring and implementation of Entity mapping / registration