#49: Added generation controller and improved restriction handling.