Refactor of Karaf commands