yeah I have no clue what this is doing. All I see is a giant soup of function calls and constructors. Break it up somehow. Or else make helper functions to make it cleaner to read.