Cleanup and priority fixes.