Further refactoring in to a highly modular structure