JavaScript: Simplify_RK