adding Javadocs, removing used code, removing unnecessary comments