Javascript library with common functions