Add prioritizedworkqueue, thread stuff, ui tweaks, small optimizations in file util