Implemented domains
Added winston logging so I can see errors