Fixed. It's not as short as it maybe could be, but understandable and performs the intended function efficiently. #96

(Still crashes on Esc)