Merge pull request #5 from Mirantis/master

pull upstream changes
Support for user and system tables scope was added
Merge pull request #105 from dukhlov/master

refactoring and support user and system tables scopes have been added