Polished the code up.