Refactoring: Huge code cleanup by removing $output and a better progress view