Added proper comments to PHP methods