Implemented toggling of bar. I am going to finish some more docs and then reduce the number of global variables.