improve commands support; add tests