Update apigen, break into classes