Cleaned up code. Moved more variables to the global struct. Fixed two
buffer overflow bugs.