refactoring to meet standards