Fixed the database close connection issue. Also Add category to tags. Better organize code for nested callbacks.