Fixed compilation errors and added DatabasePager class