Work on pointer assignments, fix crashes