move the screen size stuff to a Screen object in common.js