Slight code improvements