added simplifier for AO code (basically same as ABC);