WIP: client refactoring

Now uses 'toastr' for notifications.