Tightened some code up.