Moved structures to top of the file.

This is to help consolidate where what types of things are defined.