dimensions.js module cleanup and  fixes