added a few more php docblocks and added _ prefix to private methods