Refactoring 75% done