navbar and leftbar refactor