Changed to instance-based arrays for the sets

Fixes #3