Fixed errors and leaks
Removed useless c++ operator definition
Removed operator_t and canged to static typedef struct