Make the script compatible with processing 2

.Just a few adaptations to make it compatible with processing 2