fix lint errors
fix tests
make settings more flexible