Factor out all non-OS code. Closes #26.