Use unsigned ints to silence comparison warning. Cache loop condition
where feasible.
Optimized more loops
Silenced more sign-compare warnings and optimized the affected loop
conditions.
Merge pull request #36 from cptjazz/master

Silenced some "comparing different types"-warnings in loop conditions