JavaScript: module skeleton