Remove unused variable
Use Math.ceil in the right place