Fixed init.sh. Changed berrypi extended outputs. Changed calculations to do -1 to 1 for phase.