Refactoring and additional progress