Updated the scripts with bugfixes and support for the assignment of systematics