Moved more functions to the common header file.  Verified the same performance with the new code.