Added wrapAround parameter to SP 

Fixes #1211
Fixes #1216

@chetan51 please review
wen you are at it, could you convert the doc to the docstring notation? (just prepend `@param` before the parameter names here)