More bugfixes to voting, simplify events, use $var for jQuery vars