Merged Erics code into the repo.