Effects of biofilm structure, microbial distributions and mass transport on biodegradation processes