.ini parsing fixes and code cleaning