Merge devel-gsoc14 branch

Merge the results of Andrei Stoica as part of the Google Summer of Code into the master branch.