Improved task management in the REPL and removed the uses of deprecated methods.