Updated directory structure and added destructor wherever required.