Cleanup, added comments
Added HTML unescaping to form
Rename and move documents on update
Added read and write actions, updated roles