cherry-picked general commits from biocro-module branch