Alert Boxes, and cleaned up the javascript