Export and minor fixes