redefining everything
Improved encapsulation
fixed memory leak