Refactored XML parser classes and added javadoc.