Unit Tests

Implemented unit tests for new features; fixed bugs found during creation of unit tests; updated documentation to reflect changes.