Various code clean ups.