Refactored and Fixed ViewCommand