Handle a few warnings about unused values and results
Define VERSION as string

Handle VERSION as string and fix several writes to NULL.