[fix] Uninitalized members, division by zero, resource leaks...