Added some documentation to common.js