Refectored gen'ed code.