Kernel manipulator improvements:
   - change rtrim to preg_replace