Refactored and fixes issue with cart messaging

@tsanko made some refactoring changes and also fixed the issue with success message not shown. Please take a look and pull in.
Is that change already in? If it is not, I don't want to make the change before it is in and not have it work.