Trying out a module pattern for javascript