added header bar and some more functionality to some of the code