added additional comments to the api and routes js