Change clear to everything

Also json encoding the sorted results set. Not sure why this is
necessary, but doing it for now.
Small specs clean up