Added refresh functionality for tables on the main page