FINAL EDIT: Fixed bugs and cleaned code.

This is my final edit. I fixed a couple of bugs for setTokenClass.
Somehow, something goes wrong whenever we go into comments.

Otherwise, the code is done. We completed the bonus part as well.
Cleaned the code for easy reading.