Implemented the main and result page