Moving some commonly-used OS features to their own module.