Added Counter to corefunctions and made progress bar import more robust.