Polishing

Polished the code a bit.