Unify completions and templates. Fixes #51.