Using pre-compiled struct objects

Pre-compiled struct objects are a bit faster than using the struct
functions directly. It also hopefully adds to the readability of the
code.