Changed some ifs to assertations.
Added test of float value, small changes.