Fixed check data not being only working for ints not floats.
Added more comments to make things easier to understand