fleshed out some commands (particularly flag setting and unsetting)