Refactored commands & interpreter into logic