made functions static
removed pointed_type
more gen cleanups