some refactoring, more consistent naming (python style), improved top-level-completion