Refactored error handling
Refactored progressBar (including fixing reset bug)