Updated to work on non-Unix machines.

* Also removed implicit type conversions.