improved check to $this->StylesXML

caused an error if variable had been unset before/was not set
renamed $this->Mode to $this->Type

access to non-existing variable $this->Mode caused errors
Merge pull request #30 from incratec/master

Improved access to undefined/unset variables