update/cleanup JS