refactor completion method into a primitive "raw" version
add in a config variable for haxe 3 specific stuff