Edited PHP Docs and added more comments.