SF Feature requests #168 and #163

Tests passed on linux64 (gmake & cmake build)