Almost get moz working by duplicating a lot of code