trying to fix tests
most tests now passing
all tests now passing
refactoring
further refactoring of scorecard functions
refactoring app file