removes empty slides and updates some things