Added preferences and progressbar. Still need to tweak the progressbar.