Implemented the remaining task types. More or less adequate single-threaded version.