Experimenting with javascript class as a module