Expanded the vertical/horizontal background image position calculations (motivation: easier to read and also helps with debugging).