Added logic to dictionary page, completed code for home page.