Refactor sliding menu.