Refactor to eliminate unnecessary warnings/errors.