More COG Support

may remove COG & replace with a custom code generator