Steal more code from MobileFrontend

Fixes tables and horizontal scrolling in general

Change-Id: Ie9b6fb86980a6b22b76cf50779908e13b855f61f