fixed double stack traces for some Prelude functions like parse. This
happens when Java methods fill in the currentAST and the stacktrace.
They should not since the calling code takes care of this information.

Also removed where possible the use of static types in writer calls.