PEP8 style fixes
Add grammar scoring function