Implement trove::taskmanager

Refactorize some parameters and implement taskmanager class.