Add EDN output + small corrections

- edn output
- fixed a very minor memory leak
- use stderr