Reworked functions to fit around managed structs