Memory problems in Ekan now fixed

There were big problems with uninitialised strings and such, this has all been
tied up now.