Reorganization and fix of eigen routines