Javadocs added and code without warnings.