Move functions to helper module.