Added main index page
Added the logic for day and night