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.
So again, what's your opinion, should we be consistent on this?