Fixed parallel BW transform with tests + helpful functions added