Further optimized Davidson routine by minimizing the number to times the full matrix is applied