Cleaned up replaced code.