Added an incrementation function and moved the AddTask functionality to the proper location.