refactoring.

more refactoring.

Autocompletion improved.

-

tests.