export and minor fixes