Some linting fixes and test for parsepattern