Restructured to allow the inclusion of more parameters. Scripts have been updated accordingly.