Cleaned up JavaDoc and add Unit Tests