Refactor and allow completion precedence

Follow VIM 'complete' settings.