Cleaned up consensus code, added docstring, usage notes