code cleanup, begin implementing firefox support