Tail recursion on filter an foreach.
Refactor and add tests.
Add support for AST conversions for argonaut, json4s and spray-json.