Move the sites command to its own file
Verify that the API URL ends in a /