Can't get reorder functions to work properly

The logic is there if someone wants to take a crack at it, I probably screwed up syntax somewhere is all.