Restructure code to allow MBeans to be registered by implementations. More changes once I get the tests working.