use a more efficient powerset algorithm

and fixing some whitespace, apparently