Remove unused code and fix regex