Code refactored.
Fixed tasks management with DEFT API.