tom refactored index.js to better allow for main navigation (tabs)