implement remove_expired, add setup scripts