Created main page functionality.