Adding functioning main page