many changes which I should have done in incrementatl commits :(

these changes should make usage of the tool easier and writing plugins
easier,but old stuff may be broken
Merge pull request #1 from justine-square/too-many-changes

many changes which I should have done in incrementatl commits :(