move config into dirs, add more tests