Finished the functionality for the webpage