Fire: fix build, clean up and modernize code