Latest refactoring and simplification