Clean up tests and flash code