debugging free memory problem, and found others.
got init working again
found problem with indices