Clean up impl. Reducing num of divisible checks