refactored some state/rpc stuff to "shared" package
making the add-on OSGI compatible