refactored pickle everywhere but Session, removed unused imports