Lock splitting

Some more lock splitting in the core to avoid Matlab deadlock