fixed bug in fortran code: alloc and dealloc of linked lists. clarified error messages