Nick Code refactoring out into function library

Moved out and created a couple of functions into the library for the
procedurals in nicks function library. Also cleaned up the header and
added in nicks information so its more consistent with the library.