moved ComponentRegistry from config package to components and minor refactoring