retain by copy, not by reference, except for $_SESSION
remove unused docblock
better exceptions
__isset() connects to $_SESSION as well