mostly refactoring and making things look better