Added dependency to Scala Pickling
Removed usages of deprecated API:s.
Refactored the code a little - renaming to better suited names.