Merge pull request #313 from ndawe/master

MRG: Cleanup and a few minor improvements