completes refactoring and restyles