Fixed some JavaDoc and added some exception classes.