Structs typedefed, magic numbers removed