44 api cleanup

I changed how this page works a bit, to try to simplify the Javascript