Added functions to safety.slx