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.