Reworked programming the Arduino.
The browser now stays on the same page while programming and updates a box for stderr every 2 secons to show progress.
The form is loaded into an iframe to do this and calls a javascript function when done.