Squash-library-branch updated master 2014

This PR is the library-branch after 
git rebase Squash-library-branch 
with the updated master.

I skip the pubsub stuff since it looks like oliver takes care of that stuff.
I hope this is the right one.