TODO update
missing static
shorthands
fixed sentinel type
fixed memory leak