Some big changes (lots on histogram comparison)

- Histogram comparison with Chi-Squared method (to check - it doesn't
crash but produces weird results :D)
- histogram new()
- u16 2D array new()/free()
- overall improvements/clean...