Added database query helper. Pagination now works.
Added support for menu items.