Cloned and made minor fixes and notes