Add REST web service component - Tidy up code