Adds cabinet reopening, refactors, and fixes tests