Fix a syntax error in flaggedrevisions
Fix return tags
Add throw tags
Remove duplicate keys and make readable