Fixed some types and added an example using sizes and resource dimensions.