Decompose types and functions, add catalog based functions and structs

Signed-off-by: Ken Barber <ken@bob.sh>