Eliminate redundant tests and add stub