Fixed some things (added legend, DOM 12), others still broken (json error)