working to make memory safter
cleaned up analysis, safer use of Eye()