Add alerts, bug fixing