Refactor products controller and tests