Better structure for taskmanager