Finished refactoring w4.1