Move functions to separated module.