Update kernel.c

Fix a spelling error on line 26.
Remove an unnecessary hyphen on line 30.
Optimize the first while loop.

Take the calculation of the screen size out of the loop declaration. This way, the screen size is only calculated once, instead of each time the loop executes. 

Add a few spaces here and there to improve formatting.
Merge pull request #5 from sbennett1990/master

Spelling in kernel.c