Some more stuff, mainly cleaning up the priority list and code