Some cleaning before we fix the segfaults