Fixed a bunch of incompatibilities with 2.x
Use int instead of uint
Use double instead of float