Added rules that account for different devices.
Fixed some logic pertaining to canvas size.