Clean Before Checkout

Added functionality to allow clean before checkout. You can now select the option "Clean before checkout" when adding additional behaviors. Test is also added to verify the functionality.