Corrected fault in code which wouldn't compile and changed javadocs