Add a helper function to detect device dimensions.
Start making a widget library for easy UI building.