Cleaned up code in index.js, defaulted URLs to base page.