Polished up code.