Refactored pycompleter