Update libreg conv.c/h to complete refactoring to work with SPS mains
Major update to adapt to new libreg API