New encoding format and various cleanups.