Refactor the partial match code to attempt to solve do_complete issue