With this it's starting to look like something. It's no longer giving any corruption errors now with any of my test cases. However e1 is still being set to the definition of e3 for some reason.