cleaned up code in lanczos.cpp