Start refactoring kbmira to slot in lattice version.