Merge pull request #50 from dukhlov/master

fixes after functional testing
Merge pull request #1 from Mirantis/master

Merging with master repo.
Test for query added.
Merge pull request #51 from yyekovenko/master

Test for query added.
Merge pull request #7 from Mirantis/master

pull upstream changes