reformated, fixed calls to alretify (was using 0.3 syntax rather than 0.4), converted pgm to use alertify