Added progress bar and cleaned bugs.