More reorg. Move Cgats class to a module