add configuration to library, settings are singleton object from now, it stores all of the options.
move conf to settings
fix models for python2/3 compatibility