Switched to the C99 standard and cleaned up the code using intermingled code and variable declarations.
Updated the struct initializations to use designated initializers and compound literals.