Tidy up integral types, and use some bools.