Flat plans and flat types