Rewritten functions into header