Sorting spinner edits and tests.

I wrote tests for the pin filter. In doing this I noticed that the
spinner logic doesn't correctly update all the boolean values, so I
changed it to be correct. It remains to to be seen whether this breaks
the build, and also remains to be seen whether or not the logic in
refreshLocalPins() is correct.