refactored download view ctx and added restart in angular