Add some Javadocs and tests.

Adding some Javadocs, a few unit tests, and renaming stream actions for consistency.