Added the Domain type to API

Cleaned up some things in the problem package as well.