Added subscriptions unit tests. Fixed some exception handling problems.