Cleanup
Clean up flash handling.