Clean up histogram code
Minor edits
Clean up code

Variable names changed, remove prepeended underscores from function
defs
Clean up betelbot server code
Clean up betelbot driver code