More conventional JavaScript code style