Add batch db actions and popularity counter