Renamed variable and added javadocs