memory optimization via covariance caching (WIP)
added logger and memory debug optimization (done)