What was the purpose of a literacy test before voting?

1. To help people relax before voting

2. To make sure only smart people could vote

3. To make voting more secure
or 4.
To prevent people from voting