Removed dead code; fixed phpdoc

There is a lot of undeclared properties, I've declared them and added few missing phpdocs. I've also removed dead code.
I know it doesn't have to be imported. My question is what's the style to follow, considering that now you are trying to fix the style of the library