Added the settings tab functionality, debug traces has been cleaned and added some commentaries