Implemented basic Logging system and improved Memory management (removing objects)