Clean up and removal of unneeded code.