Updated layout code to calculate it's bounds better if the screen size changed.