Code refactoring; arm/disarm