cleaned up the code a bit...absorption and scattering should both work