Adding phpDoc comments

Now I added comments to every function.