Added database close
Removed blank line
Updated pagination model