Functions updated for dealing with non-INI documents