Fixed small glitch in diagram, added AJAX