refactored sidebar and top bar