Add scalariform to API and scheduler. Fix compiler warnings.