Removed redundant types and added folds.