first few changes to make it work for preprocess data. some changes to handeling of phase parameter
first few changes to make it work for preprocess data. some changes to handeling of phase parameter

agapow/smartr,thehyve/naa-SmartR,thehyve/naa-SmartR,thehyve/heim-SmartR,thehyve/heim-SmartR,agapow/smartr,thehyve/heim-SmartR,agapow/smartr,thehyve/heim-SmartR,agapow/smartr,thehyve/naa-SmartR