Numerous testing and bug fixes.

Primary features are tested and are observed to work.