refactored pickle everywhere but Session, removed unused imports
Merge pull request #493 from niphlod/fix/refactoring_pickle

refactored pickle everywhere but Session, removed unused imports