Add retry by type and refactor to Ember