Removed console.error
removed null comparision
Improved little pubsub configuration