Some cleanup, mostly support for auth
Clean up all the things, run from JS for now in the interest of time.