Migrated to PSR-4. Made domain configurable.