Fix various issues

We should also figure out a way to test the ES3 output.