Move functions within header function