c++-11 compatibility
moved to eigen3 instead of eigen2
misc cleaning for osx
merge with head