Improvement to the Array.remove() function since there is no point in continuing the loop if the array is empty.
Made addClass() work with strings of space-separated classes.