structs/unions and a LOT of bugfixes