added code to handle subscriptions to pts, bts searches and organized code a bit more