Domain support

Added some basic domain support for #30