Do prior minor refactoring and style check
Refactor output manager and add remove table command