clean resources, added task manager