Making the module behaves as a thread
Fix add and remove operations