Added common domain stuff with tests