Added pagination and focusing options to the frontend script.