Some code cleaned up.