smaller licence header comment
encapsulated library functions using js module-pattern