Implemented constructor and destructor