Needs documentation and testing and some refactoring.
Needs documentation and testing and some refactoring.