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

these changes should make usage of the tool easier and writing plugins
easier, but old stuff may be broken