Minor javascript refactor to use our style and such. Probably still not working, but we'll get there.