updated JavaScript module, renamed constants