restructure code and add new features
use simplejson's 'default' arg for dumps and simplify settings' options
update docs