Clean code and externalize JSON sources
change GD JPEG support