Some cleanups from hexcoder++