Remove reload parameter during history handling

The regex is kind of complex here, so please take a close look.
Changed to non capturing groups and removed any fragments before parsing the parameters. This should no longer affect similar stuff within the fragments.