Cleaned up and generic-ified

Now states are strings, allowing for powerset construction