add inner filter, update to more strict mode

jshint happy
some stylistic corrections
handle parse/serialize exceptions
handle circural structures more properly