Improved version of powerset added.