Misc refactoring
Unit tests for DTOs
url fix