Added main functionality for command parsing