Minor struct changes
Compacted the code a bit