Take a more straightforward approach for code gen