Make the code of  mode readable
Remove obsolete debugging NSLog code