refactor task manager and modules loader .