bound header bar to internal data and cleaned up a bit