Chris: As I said, if you do a DrawPic, then DrawCel, you won't have the junk left behind.
Nick: When I open sourced my compiler, Lars updated it, the object file format, and made it support objects created from Sierra's classes. However, I had trouble compiling it under DOS and Windows and was getting runtime errors. It also seemed to create scripts that worked under FreeSCI, but not Sierra SCI. So, the current build of the compiler is based mainly on my old sources from before the modifications.
Lars' updated version is available in the CVS at sourceforge (project scicompiler) if you want to play with it. One main problem was that I make sure to initialize EVERY variable at the start, and free EVERY variable upon exit because SCI Studio may be running the compiler continually if the user compiles more than one script. However, if you are running the command line version, it's safe to not initialize/deinitialize some things because the next time it's run, they'll be at their intial values again. So, anyways, variables not being initialized/deinitialized was one of the problems.