Finished the code behind for the catalogue and adjusted the error handling