Fixed the problem where modules were not found.

Updated to use the npm client so that npm requests will be cached;
corrected some weird code in the calculations; corrected some spelling
and grammar errors.