component refactor and test shutdown fix