Update service example code

This updates the service example code so that it doesn't have things that will
cause issues if someone just blindly copy and pastes it into their code and want
to run multiple services usig said code on the same system. Replaces the code
with a set of comments that explains what is going on and why.