abstract out domain parsing
Merge pull request #22 from benbalter/domain-parts

Abstract out domain parsing