wrapper cleanup & fixes