Updated core and matlab interface to 1.2.1