Moving functions out into headers.