Added detailed comments to the controllers handing $resources