Fixed bug in header for wrong type, removed hardcoded type sizes. Tests pass