Main program linv1, and classes