Sort the list of installable parts so the white ones are at the top. Also some speed fixes.

Not 100% sure about the formating/function call formats/stability of this one. I don't have much experience with the code base so feel free to suggest improvements.