Merging master into 0.5 branch. 

I added some stuff in the master branch