cleaned up some code and added priorization of jobs. decreases the build time under certain situations when you have jobs that take uneven time to complete.
fixed issues with the stat-thread