Now it works. Got to complete garbage collection and understand * vs ** pointers and arrays though. Also maybe use smart pointers...