just some refactoring

Also Added functionality for voting