refactor(main): split mozilla functions in to separate file

@jrconlin