Improvements and bugfixes. Implement proportional processor
distribution. Dump state when debugging.