rename ib_types -> types and make params immutable