cleaned up variables to switch to the ones defined in res_scat_header
added required dependencies
function for calculating 0K xs