Improved code

Improves the ReadSettings() function and creates a new function called ReadIniValue().