Fix removable of invalid characters and multiple spaces when stripping

Plus merge block regex