Moving functions in to various util files.