introduce json models and extractor

minor restructuring