Refactored subscription checking.
Added basic SQL table for subscriptions.