Merge pull request #14 from dumerrill/master

Compilation and bug fixes, improved histo performance
Merge pull request #8 from NVlabs/master

Pull into development repo