Cleaned up the clone and made it easier to read.