organized could a little.  added javadocs