Cleanup

Lots of cleanup. Support for FF is back.