The complete lack of vertical whitespace in this file makes it notably harder to skim than it needs to be.  Please break it up into logical chunks using blank lines for readability.