Moving helpers to utils, then added tests for them