Refactor & progress bar