javascript cleaned