Adding more unit testing

Updating model and db
unit testing
update subscription