Fixed somed bugs
Fixed integrals
Separated adaptive binning and regular binning