Number crunching and refactoring