Interestingly my language has both genders and (reduced but present) animate-inanimate distinction. It also used to have singular, plural and "double" declination. As far as I understand this all was originally "invented" in proto-indo-european. Man, PIE was wild.