Added error checking and cleanup to clients. Want to refactor so the same error checking is used everywhere. Will likely move to common somewhere. Perhaps in the entity classes themselves as static methods