* refactor controller logic * add additional validation checks to update commands * refactor and improve tests