Cleaned up/added comments and added header

I also fixed the bug in CheckWord you guys told me about.