Memory management
Removed debug statements