Added unfinished function conversion
Added forgotten newline to the output string
Used updated function name
Fixed wrong variable name
Finished conversion to new API and added enum conversion