refactoring root page to use ajax calls in menu