fixed all buttons.

fixed pagination.

moved pagination to functions.php

TODO: build a better function for pulling data from the database and printing a table!