Cleanup for session module

Still experimental, testing tomorrow