refactored contents of tasks/util into more appropriate locations