Optimised regex and re-added trim() following conversation in #52
Fixed semantic meaning of `requireScopeParam()` and `requireStateParam()` by changing their default value to true