Fixing configuration stuff and unit tests