For the second of these, check out the "orderfield" attribute on components:
http://hlkitwiki.wolflair.com/index...._Element_(Data)
(note that the auto link detection messes up on closing parentheses, and I don't have time to get that correct right now). I'll talk about how to build a prereq to count the existing copies of that skill another time - I'm afraid I need to get back to work right now, but I had a quick answer I could link to for how to build the index.