Improved variable names, and javadoc.