Refactor upper bar