fix tidy functions, add typescript syntax