Takes the port as a different parameter from the URL and adds unitary tests
Changes format