Add phpDocs; add type hints; rename some class attributes