Pickle usage now fully Python 2 and 3 compatible

Pickle usage now fully Python 2 and 3 compatible