Clean up some dirty code.
Remove some redundant code.