removed some testing code and comments; added additional javadocs