Remove unnecesary pages and states