cleanup of redundant code