Separated task logic in separate class.