The code has been refactored to encapsulate the operations on the tasks within a struct called 'TaskList'. This helps to remove the global variable tasks and brings in more modularity and clarity to the code. The functions which were earlier standalone functions have now been made methods on the TaskList struct. Also the 'handleCommand' function now accepts the TaskList object as a parameter so it can operate on its tasks.
The code has been refactored to encapsulate the operations on the tasks within a struct called 'TaskList'. This helps to remove the global variable tasks and brings in more modularity and clarity to the code. The functions which were earlier standalone functions have now been made methods on the TaskList struct. Also the 'handleCommand' function now accepts the TaskList object as a parameter so it can operate on its tasks.
Resolves #23