Added start of picture handling code