Cut down javascript size, and fixed alerts.