Refactored tests to reduce code duplication and increase readability.
Changed protection level on session field.
Removed unnecessary extend statements.
Removed unnecessary return statement.
Clarified comment.
Split multi-purposed test and clarified names.
Merge pull request #739 from citerus/codecleanup

Assorted code cleanup, no functional changes