Brought result.py to 100% coverage, refactoring and improving along the way.