Added alert sample
Major improvements and fixes