option to config stacktraces externally; flat() helper function added