Clean up and documentation for library, memberships and participants javascript