Added support for isolated model history in unwrap tool.

Did a bit of cleaning up.

Signed-off-by: Jakob Brandsborg Ehmsen <jakobehmsen.github@gmail.com>