added cleanup to apis/tasks.rb
cleanup old versions in apis/tasks.rb