Changes in the codebase

Changed the fuction folder_check,in initialization.h, and made it much simpler
and some other minor changes