apigen: cleanup template
apigen: towards structured API