Bugfixing. Some features added to ease post-processing.