Refactoring now at working state.