removed extraneous CGContextRestoreGState with no CGContextSaveGState counterpart
Allow lineNumber, imageWidth and imageHeight to be transmitted as 16 bit values
Some code cleanup
Streamlined time conversion funcs