Inlined a couple functions