Expanded session testing, small code cleanup