fixed a bug in junctions.
refactored the simulink export.
fixed a bug.