Split into two parts for faster image creation