Updated code template generator