Cleaned up high level functions, use now L_invariant to recognize the
curve (faster).
Added function to recognize the curve from L_invariant