Some code style changes. Fixed memory management in Reader
Fixed some errors brought about byinterface changes.
Removed debug statements in dtors.