support for firefox webapp - refactor