[EM] Added model and logic classes.