Merge "Refactor hid command, mitigate overflows"