Compilation and bug fixes, improved histo performance