Added a warning for large recursion triangles and now the app quits when the window closes.