Added progress notification support, fixed a few bugs