Changes from code review
Export sproxy as a library