Refactored model to stick to core Scala types instead of JSON.