Implemented sending of commands.