few adds and a correction

added possibility of giving a json string to constructor
added options validity check and try to pass widget with only the
permitted options (or not at all)
corrected a logic fault in framework selection