Reorganize integer types

See commit messages for details.