Refactoring and tests
Fixed assessment logic