cleaned up some code.