added javadocs
changed exception throwing
Merge branch 'javadocs'