Continued refactoring + code cleanup:
- Fixed compiler errors / warnings
- Fixed unit tests
- Expanded unit tests to cover more code
- Clearified documentation
- Fixed minor issues
Merge pull request #1 from ewjmulder/fitting-redesign

Continued refactoring + code cleanup: