Bringing code over from original repository.