fixed bug when not voting on last question; cleaned up code