Major Refactoring

* Adds several tests
* Adds buffering for variant streams
* Major refactors and code cleanups
* Adds javadoc
Wanted to keep it flexible through the static Factory pattern in case we added more callers in the future.