Task Management in JS