reduced compiler warnings (float init, signed/unsigned compare)
fixed memory leaks unveiled by static code analysis