Implement JSON download
Improvements