Finished refactoring to api system

New and edit task has been moved to api system