Use Applicatives instead of Monads (when readability isn't reduced).
Add `extract` function.
Remove redundant imports and unused `LANGUAGE` pragmas.