Add tests for new commands. Few changes to share and console to
facilitate testing.