Reworked class Command to receive tasks, process them and send output
back to Stream.