Polished the code a little.