Commit working (albeit memory-leaking) first version