More robust code for making impact layer classes.