implementing ~mode in scheduled txakun. allow task to be able to use ~mode and pulse
several changes to separate funcionality into classes