Added Page delete, rewritten some page logic