Started fixing casts to int from ceil()