Refactor wrapper slightly, new config options

added some interfaces, some additional configuration options.