Adding in pickling behaviour, although it is disabled until scala-pickling issues are resolved.