Extracting total vote counter to models and cleaning up js files