remove unrelated code
make sure we call navigate after mozL10n ready
refactor the coding style in core modules