Added a few missing javadocs and fixed some exception problems.