Javascript module made easy