Refactor Domain and domain test to new projects