Improve command functions