Cleaned up some code.