Finish porting discarding to Ember