refactor menu and bootstrap database