Json4s: refactoring.