Corrected some incompatibilities between model and core
Library bug fixes

Many small errors