Added main module machinery.