Distribution tasks and minor cleanup