Some code clean ups.