Make voting function... simpler?

Simpler in logic maybe, but this is way harder to read. I need to
absract this stuff out. Also regex may help with `valid`.