Clean up Protect page function somewhat.