Added errors for -ve rates, moved macro_pops call out of elements loop