Refactoring/Rewriting of some core components