Changed detach() to take multiple component names

detach() now takes a variable number of arguments where each argument
beyond the first is a component name to be detached