Improved data output with JavaScript