Enforce mobile viewport.
remove some code duplication.