split up ast code in separate units