Add Discard to state check of model before clearing up
Clear up imports