fixed some places where stray whitespace had crept in;
this is probably a result of applying the PEAR line length standard;
simplified how the queries for the session storage are handled;
explicitly checking the variable type to eliminate php warnings/notices;