Added some comments on the backend for easier understanding of the code