first big (really bug) master refactoring
graceful reload is working again
mules and gateways are correctly managed