Improvements for pull request #51 branch sf_integration