Moved code from ipp file to header