changed usage of the 'symref' node-type
fixed function-declaration and calling
deleted unnecessary test
fixed memory-leak in while-loop