Update input. Rewrite slope calculation. Fix forking by testing if element in GFT