cleans up page types and attributes