Popups for success and failure

Adds trigger actions for displaying popups on success and failure, and corresponding messages specific to the situation. How does it look? @kadst43 @BrettASwift 
Instead of splitting this into two clauses, why not one clause which optionally takes the failure type as an argument?  That way, it's up to the user whether or not they care what caused the failure (and you also eliminate a bunch of duplicate code).