added library for voting and cleaned up some other issues