Clean up header usage
Move utility functions into cpp file