Refactoring of API and internals

From now you can specify direction of list
Refactoring. List direction added