Code cleanup and removed a bad assert.