chroot: all scripts refactored and more readable.