Memory leak fixes/crash fixes, and display notifs on action failure