Move functions up to root dir.