Major refactorings

* Add support for new overlay types.
* Upgrade scripts for OpenSUSE 13.1.
* Minor other scripts refactorings.