remove TemplateHaskell usage and avoid deprecated functions from System.Cmd and attoparsec