Initial implementation of struct-type contract generation.

Either one file or a seperate directory from utils depending on how large we think it will be. Otherwise utils has become the dumping ground for tons of unrelated parts of the code.