cleaned a bit after moving regex for params to common, Fixes #4