Main statement behaviour implemented and tested.