move external atom definitions and rewriter to separate classes