Some code polishing here and there.