Solving autocomplete delay and fixing require using path.join in all files