Cleaning code.
Publish function for user's library.
Bugfix.
Cleaned code.
Merge branch 'master' into upload
Make sure we don't add or remove publications twice.
Optimize and use objects instead of lists for sets.