refactor code to work with rewrite end-points
fix unit test for App menu