Clean up kludge-y i * 16 check with if else