Move functions to own folder