JOHNZON-28 Bad numeric conversion - thanks to Thiago Veronezi
remove unnecessary method call in loop condition
Remove unnecessary code for minor speed improvement, replace Integer (object) with int (primitive)