Initial clean up of code.