Added new powerset and regex generating subroutines.