Added comments and worked on the implementation of the API