Added paination and make use of MySQL DB