Added scratch buffer for universal graphics library