added tests and fixed ugly default setup handling