Added additional asserts to verify that the right node has the right id.
Added election code and unit tests for the election code.