Fix a bit of warnings, introduced by floating point movement
Fix more warnings.
Fix gcc build
Add back toInt instead of toFloat in positions.
Merge pull request #817 from igorko/warning_fixes

Warning fixes