Separate JS completion source files
JS completion: Fix small bugs