refactored unit size: faster and handling javadoc correctly